﻿using System.Threading;
using System.Threading.Tasks;

namespace FileStorage.Security
{
    /// <summary>
    /// 文件合规审核
    /// </summary>
    public interface IFileReview
    {
        ValueTask<FileReviewResult> ReviewAsync(string file, CancellationToken cancellation);
    }

    /// <summary>
    /// 文件审核结果
    /// </summary>
    public class FileReviewResult
    {
        /// <summary>
        /// 是否合规
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// 不合规所依据的条款
        /// </summary>
        public string Policy { get; set; }

        /// <summary>
        /// 不合规内容摘要
        /// </summary>
        public string Summary { get; set; }
    }
}